function draw(color){
    
    this.color = color;
    this.points = new Array();
    
    this.addPoint = function(x, y){
        var p = new point(x, y);
        this.points[this.points.length] = p;
    }
    
    this.isEmpty = function(){
        return this.points.length == 0;
    }
    
}

function point(x, y){
    this.x = x;
    this.y = y;
}

function rect(w, h){
    this.width = w;
    this.height = h;
    
    this.equals = function(r){
        return r.width==this.width && r.height==this.height;
    }
}